***wxie1 is now known as wxie
***catonano_ is now known as catonano
<tohoyn>I can't obtain the info structure for procedure gtk-container-child-get-property. I have tried e.g. (g-irepository-find-by-name "Gtk" "gtk-container-child-get-property"). Can you help me with this? <tohoyn>when I try describe with <gtk-container> the function child-get-property is not present in the method list. <daviid> tohoyn: the secod agument should be a name as expected by GI, camelcase, no underscore ... they are the exact same name(s) you seu for gi-import-by-name ... try to see f you can find it .. <str1ngs>tohoyn: (describe (gi-cache-ref 'function 'gtk-container-child-get-property)) works for me. <daviid>tohoyn: yu may also use accessors, for g-object instance properties <daviid>tohoyn: wrt to these functions that are not in GI, because varargs, we should offer, gradually, a manual wrap/binding, I'm still thinking on the best way to acheive this, which is not as obvious as it seems, because in g-golf, we may (and even promote) selective imports ... <tohoyn>daviid: AFAIK varargs are not (or were not) very well implemented in C++. Can you pass objects as a variable argument? <daviid>tohoyn: varags function are not in any GI typelib that I am aware of - nothing to do ith C++ - then I don't understand the last question, can you give an example <daviid>tohoyn: gtk-list-store-new isn't in "Gtk" "ListStore" either, just to gve another example ... <daviid>and fwiw has been manually wrapped in guile-gnome as well <str1ngs>(make <gtk-list-store>) should work though? <str1ngs>there I are very few cases to use -new I found <daviid>but yesteray i spoted a bug/limitation that i'd lie to work on today: <daviid>str1ngs: good for you, the more you goopsify your code the better, imo <daviid>i can't wait to have short method nams, these long names are a pita :):) <str1ngs>short methods names would be handly, but the longs names don't hurt either. <daviid>long names make th code pretty unreadable, i think, but i guess it's personal ... <daviid>this workd fie as well tohoyn (make <gtk-tree-view-column> #:title "Column 1") <str1ngs>I prefer the short names. but I'm use to GTK C code haha <daviid>which saves a call and is 10 times more readable :):) <str1ngs>what I need to figure out. not an issue with g-golf but how to make my derived classes more flexible <daviid>however, this fails: (make <gtk-tree-view> #:model $5) - where $5 would be a list-stre -| sscm-error"Not implemented:"interface ... I am gona work on this I hope to solve the problem soon ... <str1ngs>or maybe not use derived classes at all and just use constructor functions <daviid>str1ngs: what you mean more flexible? <daviid>tohoyn: fyi this works fine (gtk-tree-path-new-from-string "0") <daviid>(gtk-tree-model-get-iter a-store the-above-call-result-pointer) <str1ngs>hard to explain, I guess I want my class to be more generic. but I always seem to hit edge case <str1ngs>daviid: for context with nomad's mode-line and echo area . they are derived from the same class. one is backed by a emacsy buffer the other is back by a thunk. <daviid>tohoyn: these functions returns two values, but you can and should add their name to %gi-strip-boolean-result - and read if you ddid not yet, the manual exaplining what this is ... <daviid>str1ngs: design is certainly the most difficult task, as is naming variables .. :):) <str1ngs>daviid: aye, I'm just thinking out loud :) . I think I need to redesign them anyways. at least they are event driven unlike emacs :) <str1ngs>they only get updated when they need to :) <tohoyn>function gtk-container-child-get-property expects a GValue as its last argument and stores the property value there. What should I pass in that argument? <daviid>tohoyn: maybe it needs an override, let me check <daviid>can't you access the property using its accessor? <daviid>can you paste a tiny example, i'll try to override this function then ... <tohoyn>I have some problems with the PasteZone. It keeps saying "do not spam" <daviid>tohoyn: you may use gnome pste as well <daviid>yes, debian allws a few paste per day, dont know exactly how many ... <daviid>ok tx, wil look asap, but i'm on something else 'right now' <tohoyn>daviid: do the accessor work for child properties? did not work for me. <tohoyn>str1ngs: do you know about this? <daviid>but you may call the accessor on the child instance right? <tohoyn>daviid: it seems that the child accessors are not even defined <daviid>what call exactly, so i can (later) try ... <str1ngs>gtk_container_child_get_property is not the best function. it uses a mutator <str1ngs>which is okay when you are using C. but for this I would just use an accessor as daviid mentioned <tohoyn>child properties are properties related to the relation between the container and the child. that's why they don't have accessors (AFAIK). <str1ngs>let me clean this example up. and play with it somemore <str1ngs>daviid: GValue is not implemented right? <tohoyn>IMHO the last argument of gtk-container-child-get-property should be an output argument. <str1ngs>I used a mutator to but there is probably a better way to reduce the list <str1ngs>tohoyn: version that avoids using set! <str1ngs>this might be to functional but the find with gtk-container-get-children is just as effective as gtk-container-child-get-property ***apteryx_ is now known as apteryx
<tohoyn>str1ngs: yes but all child properties don't have corresponding ordinary properties (e.g. shrink) <str1ngs>right but you would have to account for that anyways. does GValue become false in those case or something? <str1ngs>I understand you are probably using this in a introspective way so it might not be so ideal. <tohoyn>str1ings: it is used in a Theme-D-Gnome UI demo (not introspective) <tohoyn>str1ngs: I can paste you the code <tohoyn>str1ngs: note that the code is in Theme-D <tohoyn>str1ngs: T-D has an object system resembling GOOPS somewhat <tohoyn>str1ngs: the code uses Theme-D-Gnome which works on top of guile-gnome <tohoyn>Theme-D can access GOOPS classes <str1ngs>I think though for now until there are GValues you might have to loop to get a property <str1ngs>I find though I do'nt have to do this. beause I just create slots for children I need to access <str1ngs>there are times where dynamically finding children is handy though. <tohoyn>the problem is that there are not ordinary properties corresponding all child properties <str1ngs>right, but in most cases you know the class you are dealing with. <str1ngs>trying to think if a type system would make this harder .. <daviid>tohoyn: note that gtk-hbox-new is deprecated, you should use gtk-box-new i think <daviid>I can't find the definitionof the scale-factor propoerty <str1ngs>tohoyn or you can do (when (is-a? widget <gtk-window>) (!title window)) <str1ngs>daviid: that's unstable just FYI meant to link the stable one <daviid>tohoyn: so, in the mean time, you may call (gtk-widget-get-scale-factor hbox) of course ... <daviid>str1ngs: g-value's are definitely implemented ans used everywhere in g-golf, like g-closure's in general, signals i particular, yet to come callbacks ... everywhere - there are also functions that expect Gvalue as argument(s), like gtk-list-store-set-value, gtk-tree-model-get-value, and this gtk-container-child-get-property <daviid>tohoyn: for info, gtk-container-child-get-property last argument is 'in, not out <str1ngs>daviid: ya how this would work in C is you would do GValue x; then you g_value_init . and then pass x as the last value. and it gets mutated <str1ngs>actually you would past the reference with &x <daviid>tohoyn: it sys "scale-factor" is not a child property of ... <tohoyn>daviid: resize and shrink are child properties <daviid>tohoyn: to test, i need an example that 'works' bcuse i need to look in the doc, find the type, ... <daviid> (gtk-container-child-get-property window hbox "scale-factor" ...) is incorrect <daviid>do you have a working C example? <tohoyn>daviid: I do have a Scheme example using guile-gnome <str1ngs>daviid: gtk-container-child-get-property finds the property of hbox <daviid>can you writ that in g-golf then <str1ngs>it won't work because you need to pass a gvalue <str1ngs>and there is no way to create a GValue as far as I know. <tohoyn> (gtk-container-child-get-property window-main hbox "scale-factor" x) <daviid> (gtk-container-child-get-property window hbox "scale-factor" ...) is incorrect <daviid>tohoyn: you don't understand, scale-factor is not a chld property for gtkwindow <tohoyn>daviid: forget scale-factor. The problems are resize and shrink <daviid>resize and shrink are not either ... <daviid>i thnk you dont understand how this work, if i may say so ... <daviid>(guile:106981): Gtk-WARNING **: 04:54:03.433: ../../../../gtk/gtkcontainer.c:1264: container class 'GtkWindow' has no child property named 'shrink' <daviid>yes, so the call should ass an hbox and a chld .. <tohoyn>daviid: resize and shrink are child propertied of GtkPaned <daviid>the call you pasted is incorrect <daviid>so, please paste a correct example i can try, forget about g-value, i'll handle it, i ned a proper example of a 'working' child property <daviid>thos you pasted are all incorrect <tohoyn>daviid: sorry for the incorrect code <daviid>i don't want to imprt the all gtk namespace, what is the name of the info to get hpand/vpaned procs, here (gi-import-by-name "Gtk" "Paned") is insufficient it appears <tohoyn>daviid: gtk-container-child-get-property is defined <daviid>it is (gi-import-by-name "Gtk" "HPaned"), i missspelled it imn my previous call ... <str1ngs>tohoyn: which property of hbox did you want? <tohoyn>str1ngs: resize and shrink (child properties) <str1ngs>I'm just putting a C example together <str1ngs>(guile-2.2:436367): Gtk-WARNING **: 01:11:21.671: ../../../../gtk/gtkcontainer.c:1264: container class 'GtkWindow' has no child property named 'resize' <tohoyn>str1ngs: try to add a gtk-paned object into another gtk-paned <daviid>tohoyn: ok, here is what I wnted to test so I could give you the proper feedback, <str1ngs>as daviid pointed out this only works if there are child properties like paned <daviid>the last argument of gtk-containerchild-get-property is a pointer to a g-vlue, that _must_ be initialized, that is it can _not_ be an empty g-value <daviid>welcome - please also note in this example, scrpts must import goops _before_ the defaut-duplicate-binding-handler call, then you import g-golf and selectively import the rest ... <daviid>tohoyn: so, you must know the child property type before to b make these call <daviid>tohoyn: str1ngs I want to patch g-value-init so it accept the symbol or the g-type, so we can short calls in our caode .... it was not ment to be called when i desned it lng ago ... will do this now! :):) <daviid>tohoyn: also, while debugging g-golf, I prefer scripts asjust pasted, in pace of those using <gtk-application>, please keep it as a way to work with me .. thanks! <daviid>*in place of ... it uses <gtk-window> and gtk-main ... unless the test is about <gtk-application> <g-application> of course ... <daviid>tohoyn: str1ngs if/when the function you call accept an empty (pointer to) a GValue, use (g-value-new) <tohoyn>daviid: how do I get the boolean value out of GValue? <daviid>for 'in 'inout args of course, you ahould never pass 'out args (i know you know, but just reminding ... <daviid>always use (g-value-ref g-vlue), it knows its type ... <daviid>tohoyn: you ca see that in the example i pasted <daviid>tohoyn: dimfi is 'my version' of peek/pk, it is in (g-golf support utils) fwiw <str1ngs>i've never heard of g-value-new before <daviid>str1ngs: I know how to do these things in C, but thanks for the example - it's amazing how much more beautifull things are i scheme ... :) <daviid>str1ngs: g-value-new is new :), introduced a couple of patches ago i think <str1ngs>well I better git pull. that would explain alot lol <daviid>str1ngs: i need to add it to the manual <str1ngs>I think maybe (g-value-new 'int) would be better? <str1ngs>or more like <g-int> dunno if that is actually a class though <str1ngs>main things would be 'int 'string 'boolean etc <daviid>no, because we need both, and g-value-init is the scheme call for g_value_init ... <str1ngs>tha't fine as long as (g-value-init) works but it only takes one argument which is odd <str1ngs>should be more like (g-value-init x <g-string>) maybe? <str1ngs>daviid: gtk-init is be deprecated so it's kinda hard to keep pushing that :) <str1ngs>unless we can come up with a simple main loop <daviid>str1ngs: for debugging g-golf, i prefer scrits as I wrote above, unlss it is to debug <g-application> <gtk-application> calls ... <str1ngs>the problem will be though is gtk-init is going to be deprecated completely eventually. and it's not what GTK teaches anymore <str1ngs>I'm just giving you a heads up, you can't expect people to use gtk-init when it's functionality is heading out the door. things change. <daviid>tohoyn: i just pushed a patch so now you may also call g-value-init passing a symbol, which then must be a %g-type-fundamental-types <daviid>tohoyn: in the example we used, you may replace the call by (g-value-init 'boolean) <dsmith-work>str1ngs: I have muscle memory for C-right and C-left to move by words. That's bound to slurping and barfing. ***wxie1 is now known as wxie
***wxie1 is now known as wxie
***wxie1 is now known as wxie
***wxie1 is now known as wxie
<tohoyn>If I don't apply the tag the code works fine. ***rekado_ is now known as rekado
<zzappie>Any one knows of fuse guile library? <str1ngs>dsmith: slurping and barfing is so handy. from some reason it's one of the last things I decided to learn lol <str1ngs>tohoyn: I'll take a look in a second <str1ngs>tohoyn: it shows file contents for me here. <str1ngs>tohoyn: I did notice you have two (iter (gtk-text-buffer-get-start-iter textbuffer)) and only one is useful here. <str1ngs>plus one shadows the other. I'm not sure how guile handles those situation or if that might be the cause. <zzappie>dsmith-work: Hey thanks ive found it too and was stuck exploring this person's profile for about an hour he or she did lots of cool stuff <tohoyn>str1ngs: I get squares with hexadecimal numbers. removing the first get-start-iter didn't help. <tohoyn>str1ngs: the upper parts of the hexadecimal numbers are zeros <tohoyn>str1ngs: what locale are you using? <tohoyn>dsmith-work: setting LANG=C didn't help <dsmith-work>Aren't those hex boxes because <whatever> couldn't find the right thing to be displayed for that character? <tohoyn>dsmith-work: font "Sans 18" works fine <tohoyn>it would be nice to have Courier fonts <sneek>Welcome back stis, you have 1 message! <sneek>stis, manumanumanu says: Could you help me port 3 seemingly simple syntax-parse things from racket? I am porting parsack to guile, and that is about the only thing left <str1ngs>tohoyn: though it's probably a missing font I would think? <sneek>Last time I checked gnucash is amazing <sneek>rlb was here 4 days ago, saying: OK, finally have 3.0.2 in debian and "settled" such that it should be able to propagate to testing (hadn't noticed some issues that had prevented propagation of 3.0 in general up to now).. ***selimcan-i_sani is now known as selimcan
***dsmith-work is now known as glorx
<sneek>Welcome back glorx, you have 1 message! <sneek>glorx, dsmith-work says: some message ***glorx is now known as dsmith-work
<sneek>rlb was here 4 days ago, saying: OK, finally have 3.0.2 in debian and "settled" such that it should be able to propagate to testing (hadn't noticed some issues that had prevented propagation of 3.0 in general up to now).. <sneek>rlb was here 4 days ago, saying: OK, finally have 3.0.2 in debian and "settled" such that it should be able to propagate to testing (hadn't noticed some issues that had prevented propagation of 3.0 in general up to now).. <rndd>hi everyone! newbe question alert! suppose i want to use a library written in guile. can i just load it as local files instead of placing source code inside guile directory? <mwette>set GUILE_LOAD_PATH to point to directory where the files are.