1. EuGTK now on Sourceforge

http://sourceforge.net/projects/eugtk/

The usual amenities provided by Sourceforge are there, and a 
mailing list will be up shortly. Anyone who wants to sign on 
as a developer let me know.

Regards,
Irv

new topic     » topic index » view message » categorize

2. Re: EuGTK now on Sourceforge

> http://sourceforge.net/projects/eugtk/ 
>
> The usual amenities provided by Sourceforge are there, and a 
> mailing list will be up shortly. Anyone who wants to sign on 
> as a developer let me know.
>
> Regards,
> Irv

Sign me up, but I'm not sure how much help I'm going to be.  While
we're on this topic, I'm totally stumped on one area of list views.  I
can see how we can identify the line numbers selected, but how on earth
do I extract the data contained in the selected line?  I keep getting
machine-level exceptions, so I know I'm doing something wrong.

Michael J. Sabal

new topic     » goto parent     » topic index » view message » categorize

3. Re: EuGTK now on Sourceforge

Mike Sabal wrote:

> Sign me up, but I'm not sure how much help I'm going to be.  While
> we're on this topic, I'm totally stumped on one area of list views.  I
> can see how we can identify the line numbers selected, but how on earth
> do I extract the data contained in the selected line?  I keep getting
> machine-level exceptions, so I know I'm doing something wrong.

Not necessarily. I think I broke something there. 
I should have a cure shortly.

Irv

new topic     » goto parent     » topic index » view message » categorize

4. Re: EuGTK now on Sourceforge

Mike Sabal wrote:

> Sign me up, but I'm not sure how much help I'm going to be.  While
> we're on this topic, I'm totally stumped on one area of list views.  I
> can see how we can identify the line numbers selected, but how on earth
> do I extract the data contained in the selected line?  I keep getting
> machine-level exceptions, so I know I'm doing something wrong.

Here's a patch to fix the problem. It's not clean, but it works. 
I'll try to come up with something better asap.
Add the following code to tree_selection.gtk:

constant get_data = define_c_func(GTK,"gtk_tree_model_get",{P,P,I,P,I},P)
constant col_type = define_c_func(GTK,"gtk_tree_model_get_column_type",{P,I},P)

--------------------------------------------
global function GetRowData(atom selection)
--------------------------------------------
integer cols, model, iter
object result, item, data

if gtkGet(selection,"Count") < 1 then 
   return NULL
end if

result = gtkGet(selection,"Selected")
model =	result[1]
iter = result[2]

cols = gtkGet(model,"N Columns")
data = repeat("",cols)
item =  allocate(4)
poke4(item,0)

for x = 1 to cols do
 result = c_func(get_data,{model,iter,x-1,item,-1})
 if c_func(col_type,{model,x-1}) = gSTR then
    data[x] = deallocate_string(peek4u(item))
 else
 data[x] = peek4u(item)
 end if
end for

return data
end function


You can then call this as follows:

-----------------------------------------
function ShowChoice()
-----------------------------------------
object result

-- only works if selection_mode is single;
result = GetRowData(selection)
pretty_print(1,result,{2,0})

return NULL
end function
constant show_choice = call_back(routine_id("ShowChoice"))


Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

5. Re: EuGTK now on Sourceforge

irv mullins wrote:
> 
> 
> <a
> href="http://sourceforge.net/projects/eugtk/">http://sourceforge.net/projects/eugtk/</a>
> 
> The usual amenities provided by Sourceforge are there, and a 
> mailing list will be up shortly. Anyone who wants to sign on 
> as a developer let me know.

Irv, is the package download there Linux only? I'm guessing not,
but I don't want to assume nuttin'. :)

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

6. Re: EuGTK now on Sourceforge

cklester wrote:
> 
> irv mullins wrote:
> > 
> > 
> > <a
> > href="http://sourceforge.net/projects/eugtk/">http://sourceforge.net/projects/eugtk/</a>
> > 
> > The usual amenities provided by Sourceforge are there, and a 
> > mailing list will be up shortly. Anyone who wants to sign on 
> > as a developer let me know.
> 
> Irv, is the package download there Linux only? I'm guessing not,
> but I don't want to assume nuttin'. :)

Yes it is, but follow the link to my home page for the Windows version.
It has a few bugs related to file paths to be fixed before I put it 
on Sourceforge.

Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

7. Re: EuGTK now on Sourceforge

irv mullins wrote:
> cklester wrote:
> > irv mullins wrote:
> > > <a
> > > href="http://sourceforge.net/projects/eugtk/">http://sourceforge.net/projects/eugtk/</a>
> > > 
> > > The usual amenities provided by Sourceforge are there, and a 
> > > mailing list will be up shortly. Anyone who wants to sign on 
> > > as a developer let me know.
> > 
> > Irv, is the package download there Linux only? I'm guessing not,
> > but I don't want to assume nuttin'. :)
> 
> Yes it is, but follow the link to my home page for the Windows version.
> It has a few bugs related to file paths to be fixed before I put it 
> on Sourceforge.

Correct me if I'm wrong, but you really shouldn't need two packages,
should you? Anyway, the Linux version I grabbed from Sourceforge works
great on my Win2K PC. :)

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

8. Re: EuGTK now on Sourceforge

> posted by: irv mullins <irvm at ellijay.com>

> Here's a patch to fix the problem. It's not clean, but it works. 
> I'll try to come up with something better asap.
> Add the following code to tree_selection.gtk:

<SNIP>

After changing gtkGet to get, it worked great.  I had some charset
issues from copying between email and Kate, but once I cleaned that up
it was fine.  Has there been an update to the library changing get to
gtkGet?  If so, I'll need to d/l the update.

Mike

new topic     » goto parent     » topic index » view message » categorize

9. Re: EuGTK now on Sourceforge

Mike Sabal wrote:
 
> After changing gtkGet to get, it worked great.  I had some charset
> issues from copying between email and Kate, but once I cleaned that up
> it was fine.  Has there been an update to the library changing get to
> gtkGet?  If so, I'll need to d/l the update.

Yes, thanks to Ron Tarrant, who did a lot of work on the library.
You should download the latest version from sourceforge (ck tells 
me that it works on Linux/FreeBSD and Windows unchanged). Then apply 
the patch.

Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu