Re: tablelist: embed abutton in cells



luckygiurato@xxxxxxxxx wrote:
I tried both ways and I've the same result:
- No row number on the button text
- no output string

I tried even with command between "{}": same result too.


I recommend not to simply try different quoting mechanics. Instead, try to understand what the problem is and figure out the right solution. Just throwing different types of quotes at a problem isn't the best path to success.

I assure you, the suggestion I made earlier is at least part of the problem in your code.

I'm sure that I write a wrong piece of code, but I don't understand
where is the mistake.

It seems that createButton procedure does't see its argoument, but
buttons are placed in the right place (first column of each line).

When I typed in your createButton proc verbatim (except for the error with the -command option I mentioned earlier), created some data that I think simulates your data, and ran your loop exactly as you posted it, it worked fine.

I'm not sure what that means, other than the true problem may not be in the createButton procedure or the other code you posted.

My advice: try to write a very simple program that successfully uses your createButton procedure. It can be done with a couple dozen lines of code. Once you understand how to make the simple code work, hopefully it will help you understand where the problem is in your real code.

The only other thing I can think of is that when you posted some code, the definition of createButton came after it was first needed. I'm hoping that is just a problem in you showing us the code and not a problem in your actual code, because it needs to be defined before you try to create the buttons.

Also, please tell us what version of tcl/tk you are using, and what version of tablelist.

--
Bryan Oakley
http://www.tclscripting.com
.


Quantcast