[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
GTXBASE • View topic - Usar Liststore Treeview Modelo de Datos
It is currently Sat Dec 14, 2019 10:42 pm

All times are UTC




 Page 1 of 3 [ 23 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Usar Liststore Treeview Modelo de Datos
PostPosted: Sat Feb 25, 2012 7:43 am 

Joined: Thu Feb 16, 2012 1:41 am
Posts: 34
Hola,

Me pueden ayudar con un ejemplo básico del uso de liststore MVC, pero con tablas dbf.

Es muy complicado..., yo no lo entiendo la verdad.

Agradezco cualquier ayuda.

Saludos,
Javier


Offline
 Profile Send private message  
 
 Post subject: Re: Usar Liststore Treeview Modelo de Datos
PostPosted: Sat Feb 25, 2012 11:33 am 

Joined: Thu Dec 30, 2010 8:46 pm
Posts: 92
Buenas
¿ El ejemplo que tienes en /tests/gclass/listore no te sirve para entender la idea?

MVC es un poco complicado de entender, y muy extenso.
¿ Que es lo que necesitas exactamente ? De esta manera, podemos ir construyendo el ejemplo
para que puedas entenderlo más fácilmente.


Offline
 Profile Send private message  
 
 Post subject: Re: Usar Liststore Treeview Modelo de Datos
PostPosted: Sat Feb 25, 2012 10:06 pm 

Joined: Thu Feb 16, 2012 1:41 am
Posts: 34
Hola Rafa,

Gracias por contestar.

Esta parte del ejemplo que indicas.

For x := 1 To Len( aItems )
APPEND LIST_STORE oLbx ITER aIter
SET values LIST_STORE oLbx ITER aIter VALUES aItems[x]
Next

Para trabajar con dbfs, esta bien así (foro t-gtk yahoo)...?

USE customer SHARE ALIAS Clie
aStruct := dbstruct()
aeval( aStruct, {|a| aadd( aFields, a[DBF_FIELD] ) } )
nLen := len( aFields )
aeval( aStruct, {|a| aadd( aTypes, a[DBF_TYPE] ) } )

cTypes := ""
xTypes := ""
FOR nX := 1 TO nLen
DO CASE
CASE aTypes[nX]=="C"; AADD(aList, G_TYPE_STRING)
CASE aTypes[nX]=="N"; AADD(aList, G_TYPE_LONG)
CASE aTypes[nX]=="D"; AADD(aList, G_TYPE_STRING)
CASE aTypes[nX]=="L"; AADD(aList, G_TYPE_BOOLEAN)
CASE aTypes[nX]=="M"; AADD(aList, G_TYPE_STRING)
ENDCASE
/*
DO CASE
CASE aTypes[nX]=="C"; cTypes += STR(G_TYPE_STRING)+","
CASE aTypes[nX]=="N"; cTypes += STR(G_TYPE_DOUBLE)+","
CASE aTypes[nX]=="D"; cTypes += STR(G_TYPE_STRING)+","
CASE aTypes[nX]=="L"; cTypes += STR(G_TYPE_BOOLEAN)+","
CASE aTypes[nX]=="M"; cTypes += STR(G_TYPE_STRING)+","
ENDCASE
*/
xTypes +=aTypes[nX]
NEXT
* Quitamos la ultima coma
*cTypes := SUBSTR(cTypes,1,LEN(cTypes)-1)
*msgbox(cTypes+xTypes)

/*Modelo de Datos */
*DEFINE LIST_STORE oLbx TYPES &(cTypes)
oLbx := gListStore():New(aList)

DBGOTOP()
DO WHILE !EOF()
APPEND LIST_STORE oLbx ITER aIter // VALUES <aValues, . . .>
FOR nX := 1 TO nLen
SET LIST_STORE oLbx ITER aIter POS nX VALUE &(aFields[nX])
NEXT
DBSKIP()
ENDDO

/* Browse/Tree */
DEFINE TREEVIEW oTreeView MODEL oLbx OF oScroll CONTAINER
oTreeView:SetRules( .T. )

FOR nX := 1 TO nLen
DO CASE
CASE aTypes[nX]=="C"; xType := "text"
CASE aTypes[nX]=="N"; xType := "text"
CASE aTypes[nX]=="D"; xType := "text"
CASE aTypes[nX]=="L"; xType := "check"
CASE aTypes[nX]=="M"; xType := "text"
ENDCASE
DEFINE TREEVIEWCOLUMN COLUMN nX TITLE aFields[nX] TYPE (xType) OF
oTreeView
NEXT

Cómo se indica que campos quiere desplegar, no logro entender la diferencia de estos dos códigos (uno simple y limpio y el otro rebuscado), y donde indicas que campos vas a desplegar y los títulos de las columnas, SIEMPRE debemos obtener todos los campos, no se puede indicar...?

Espero no estar diciendo burradas.

Gracias.

Saludos,
Javier


Offline
 Profile Send private message  
 
 Post subject: Re: Usar Liststore Treeview Modelo de Datos
PostPosted: Fri Mar 02, 2012 6:48 am 

Joined: Thu Feb 16, 2012 1:41 am
Posts: 34


Offline
 Profile Send private message  
 
 Post subject: Re: Usar Liststore Treeview Modelo de Datos
PostPosted: Sun Mar 04, 2012 5:42 am 

Joined: Thu Feb 16, 2012 1:41 am
Posts: 34
Hola,

Ahhh, la cosa no era tan complicada después de todo, ya he podido echar andar esto del dbf con gtktreeview, ahora lo que quiero ver si es posible, es, desplegar las líneas de la lista vertical u horizontal o ambas, definir el efecto pijama (alternar colores), formatear columnas con colores por ejemplo para una lista de productos, resaltar en color rojo aquellos con existencia cero, etc, etc, y un largo etc.

Saludos,
Javier


Offline
 Profile Send private message  
 
 Post subject: Re: Usar Liststore Treeview Modelo de Datos
PostPosted: Sun Mar 04, 2012 10:26 pm 

Joined: Thu Dec 30, 2010 12:18 am
Posts: 92
Hola,

Disculpen por estar un poco alejado...

Javier,

Si quieres anexa el ejemplo a ver como podemos complementarlo ;)

Saludos!


Offline
 Profile Send private message  
 
 Post subject: Re: Usar Liststore Treeview Modelo de Datos
PostPosted: Sun Mar 11, 2012 8:44 pm 

Joined: Thu Feb 16, 2012 1:41 am
Posts: 34
Hola Riztan,

Lo que estoy haciendo hasta ahora es ir cambiando líneas de código de la aplicación pciva, del compañero Federico, a quién desde aquí públicamente agradezco todo su apoyo que me ha brindado y por la paciencia que me ha tenido cuando lo he molestado a su correo personal.

Así que no tengo nada "limpio" hecho que pueda mostrar aquí, por ello si es fácil poner las líneas verticales u horizontales les agradezco la ayuda.

Saudos,
Javier


Offline
 Profile Send private message  
 
 Post subject: Re: Usar Liststore Treeview Modelo de Datos
PostPosted: Sun Apr 08, 2012 5:42 am 

Joined: Thu Feb 16, 2012 1:41 am
Posts: 34
Hola,

He tratado de desplegar las líneas del grid en el treeview, he leído algo acerca de tree-line-patter, también acerca de set_grid_lines, y nada, aún no he podido hacer que se muestren las dichosas líneas del grid.

Yo estoy usando un tema y he agregado de todo lo que me he encontrado, en la definición del archivo gtkrc, pero aún no lo logro, pienso si es posible hacer esto y aún no entiendo bien lo que hay que hacer para lograrlo, o esto no está implementado en t-gtk.

Les agradezco sus comentarios.

Gracias

Saludos,
Javier


Offline
 Profile Send private message  
 
 Post subject: Re: Usar Liststore Treeview Modelo de Datos
PostPosted: Tue Apr 10, 2012 10:20 pm 

Joined: Thu Dec 30, 2010 8:46 pm
Posts: 92
En la versión de subversion tienes el código, algo como esto, mira si es lo que buscas;

oTree:SetRules( .T. )
oTree:SetGridLines( GTK_TREE_VIEW_GRID_LINES_VERTICAL )


Saludos


Offline
 Profile Send private message  
 
 Post subject: Re: Usar Liststore Treeview Modelo de Datos
PostPosted: Thu Apr 12, 2012 4:58 pm 

Joined: Thu Feb 16, 2012 1:41 am
Posts: 34
Hola Rafa,

Me descargue la versión del CVS, así:

cvs -z3 -d:pserver:anonymous@t-gtk.cvs.sourceforge.net:/cvsroot/t-gtk co -P t-gtk

y en ningún ejemplo veo una llamada a oTree:SetGridLines( GTK_TREE_VIEW_GRID_LINES_VERTICAL )

Estoy haciendo algo mal..?, que me está faltando...?.

Agradezco tus comentarios.

Saludos,
Javier


Offline
 Profile Send private message  
 
Display posts from previous:  Sort by  
 Page 1 of 3 [ 23 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron