-> Well, I tested your script. It gains appreciable memory at each menu
-> invocation. My deep cascading example, stays steady in memory use.
sigh. yes, i just observed this myself w/ "top".
-> ( And as a side note, this is where using
-> strict comes into play. it can force closures of l
On 02/17/2008 12:08:40 PM, zentara wrote:
-> Yeah, dynamically generated menus would be the way to go,
-> but I would watch out for memory gains everytime you invoke the menu.
-> Tk isn't very good about object cleanup.
i will remember and look into this.
-> Another problem with dynamic menus,
from zentara:
-> Now you may not see the usefulness of the entryconfigure or the cget,
-> but what if you had a more complex menu, and needed to dynamically
-> grey out items?
That is exactly what i did (the cascading menus are a recursive tree,
with several hundred+ total entries dynamically
MK wrote:
Amazingly, what worked in the end was simply adding
-state=> 'disabled'
into the actual $menu->command, hence avoiding the documented
"entryconfigure" method or cget altogether
but if anyone has any patience left could you explain:
my $state = ($count++ & 1) ? 'normal' : 'disabled
Amazingly, what worked in the end was simply adding
-state=> 'disabled'
into the actual $menu->command, hence avoiding the documented
"entryconfigure" method or cget altogether
but if anyone has any patience left could you explain:
my $state = ($count++ & 1) ? 'normal' : 'disabled';
to me,
On 02/12/2008 12:49:30 PM, kens wrote:
-> On Feb 12, 9:48 am, [EMAIL PROTECTED] (Mk) wrote:
-> > sorry, zentara, but with my perl 5.8.8 this script first produces:
-> >
-> > Bareword "Mainloop" not allowed while "strict subs" in use at
-> > ./Tkmenuentryconfigure.pl line 25
-> >
-> > And even afte
On Feb 12, 9:48 am, [EMAIL PROTECTED] (Mk) wrote:
> sorry, zentara, but with my perl 5.8.8 this script first produces:
>
> Bareword "Mainloop" not allowed while "strict subs" in use at
> ./Tkmenuentryconfigure.pl line 25
>
> And even after i delete "use strict" i now get:
>
> Useless use of a const
MK wrote:
>
zentara wrote:
>>
[EMAIL PROTECTED] (MK) wrote:
no matter where i use:
$menu->entryconfigure(#,"disabled);
i get:
Can't locate object method "entryconfigure" via package
"Tk::Menu::Cascade"
unless i use it on a non-existent $menu, in which case i get:
Can't call method "entry
sorry, zentara, but with my perl 5.8.8 this script first produces:
Bareword "Mainloop" not allowed while "strict subs" in use at
./Tkmenuentryconfigure.pl line 25
And even after i delete "use strict" i now get:
Useless use of a constant in void context at ./Tkmenuentryconfigure.pl
line 25
no matter where i use:
$menu->entryconfigure(#,"disabled);
i get:
Can't locate object method "entryconfigure" via package
"Tk::Menu::Cascade"
unless i use it on a non-existent $menu, in which case i get:
Can't call method "entryconfigure" on an undefined value
Also, if i add a -command i
10 matches
Mail list logo