Tree Table: how to create and reference tree items dynamical

F

Frank Steinmetzger

Guest
Hello again

Unfortunately, this week has been a week of encountering SKILL constraints.
I designed an app form with a tree table which shows a list of commits from
my versioning repository. Upon a click, I would like to show some details
about the commit.

The code examples in the documentation on how to create a tree table all use
manually defined variables (such as dow=hiCreateTreeItem(),
nasdaq=hiCreateTreeItem()). But what if I don't know how many variables I
need? I tried the C++/Qt approach by simply using the same variable for all
items. In semi-pseudo-code (b/c I don't remember the exact names and syntax
of the functions):

nextcommit = getNextCommitInformation() ;own function, returns string or nil
unless( stringp(nextcommit)
item=hiCreateTreeItem( <<information from nextcommit>> )
hiAppendTreeItem( tree item )
nextcommit=getNextCommitInformation()
)

But now of course, when I select an item in the table and my callback is
triggered, I always get the symbol nextcommit as reference, so I can only
reach the data that is stored in the last item of the table. The same
happens when I use hiTreeTableGetSelection(). My SKILL-Savvy Tutor also
doesn't know how to accomplish what I need.

Can you please point me into the right direction? I'd appreciate it.


PS.: How can I get rid of the root line in the tree table? The list is flat
and has no expandable items, so I don't need the line. In Qt it's just one
style setting, but the SKILL equivalent has so far eluded me, and I saw it
possible in some screenshot of the Cadence documentation.
--
Gruß | Greetings | Qapla'

They say that memory is the second thing to go...
I forgot what the first thing was.
 
On Thursday, May 31, 2012 at 11:33:01 AM UTC+2, Frank Steinmetzger wrote:
Hello again

Unfortunately, this week has been a week of encountering SKILL constraints.
I designed an app form with a tree table which shows a list of commits from
my versioning repository. Upon a click, I would like to show some details
about the commit.

The code examples in the documentation on how to create a tree table all use
manually defined variables (such as dow=hiCreateTreeItem(),
nasdaq=hiCreateTreeItem()). But what if I don't know how many variables I
need? I tried the C++/Qt approach by simply using the same variable for all
items. In semi-pseudo-code (b/c I don't remember the exact names and syntax
of the functions):

nextcommit = getNextCommitInformation() ;own function, returns string or nil
unless( stringp(nextcommit)
item=hiCreateTreeItem( <<information from nextcommit>> )
hiAppendTreeItem( tree item )
nextcommit=getNextCommitInformation()
)

But now of course, when I select an item in the table and my callback is
triggered, I always get the symbol nextcommit as reference, so I can only
reach the data that is stored in the last item of the table. The same
happens when I use hiTreeTableGetSelection(). My SKILL-Savvy Tutor also
doesn't know how to accomplish what I need.

Can you please point me into the right direction? I'd appreciate it.


PS.: How can I get rid of the root line in the tree table? The list is flat
and has no expandable items, so I don't need the line. In Qt it's just one
style setting, but the SKILL equivalent has so far eluded me, and I saw it
possible in some screenshot of the Cadence documentation.
--
Gruß | Greetings | Qapla'

They say that memory is the second thing to go...
I forgot what the first thing was.

Same issue that I'm dealing with now, any solutions?
 
On Tuesday, February 14, 2017 at 11:56:00 AM UTC+1, flashm...@gmail.com wrote:
On Thursday, May 31, 2012 at 11:33:01 AM UTC+2, Frank Steinmetzger wrote:
Hello again

Unfortunately, this week has been a week of encountering SKILL constraints.
I designed an app form with a tree table which shows a list of commits from
my versioning repository. Upon a click, I would like to show some details
about the commit.

The code examples in the documentation on how to create a tree table all use
manually defined variables (such as dow=hiCreateTreeItem(),
nasdaq=hiCreateTreeItem()). But what if I don't know how many variables I
need? I tried the C++/Qt approach by simply using the same variable for all
items. In semi-pseudo-code (b/c I don't remember the exact names and syntax
of the functions):

nextcommit = getNextCommitInformation() ;own function, returns string or nil
unless( stringp(nextcommit)
item=hiCreateTreeItem( <<information from nextcommit>> )
hiAppendTreeItem( tree item )
nextcommit=getNextCommitInformation()
)

But now of course, when I select an item in the table and my callback is
triggered, I always get the symbol nextcommit as reference, so I can only
reach the data that is stored in the last item of the table. The same
happens when I use hiTreeTableGetSelection(). My SKILL-Savvy Tutor also
doesn't know how to accomplish what I need.

Can you please point me into the right direction? I'd appreciate it.


PS.: How can I get rid of the root line in the tree table? The list is flat
and has no expandable items, so I don't need the line. In Qt it's just one
style setting, but the SKILL equivalent has so far eluded me, and I saw it
possible in some screenshot of the Cadence documentation.
--
Gruß | Greetings | Qapla'

They say that memory is the second thing to go...
I forgot what the first thing was.

Same issue that I'm dealing with now, any solutions?

Just found the solution, try gensym() function to create a unique symbol
 

Welcome to EDABoard.com

Sponsor

Back
Top