TOPIC: Why this Tabs doesn't show first tab title ?
#1816
Why this Tabs doesn't show first tab title ? 7 Months, 2 Weeks ago
I'm trying using tabs with suneido but for some reason the example bellow shows fine from the suneido ide but when running standalone the first tab doesn't show it's title/caption.

From the workspace execute: PersistentWindow(#(TestTabsTab0) newset: "dadset2")

After that from command line: suneido dadset2

And you can see that the first tab show nothing as title/caption, any clue on this issue ?

Thanks in advance for any help !

TestTabsTab0Control
Code:


Controller
{
Title: 'DADBIZ'
Xmin:300
Ymin:300
Xstretch: true
Ystretch:true

New(@args)
{
super(@args)
//.Vert.Tabs.SelectTab(1)
.RootWindow = this
Delayed(100, .updateTab0) //updated after Andrew tip
}
updateTab0()  //updated after Andrew tip
{
childs = .Vert.Tabs.GetChildren()
childs[0].SetText(0, 'Sales')
}
Controls: #(Vert
(Tabs/**/
//(Tab: '.', Vert)
(Tab: 'Sales', Vert
Skip
(Button 'Sales', command: 'salesInvoices',  xmin: 200 xstretch:1 ystretch:1)
Skip
(Button 'Products', command: 'salesProducts', xmin: 200 xstretch:1 ystretch:1)
Skip
(Button 'Entities', command: 'salesEntities', xmin: 200 xstretch:1 ystretch:1)
)
(Tab: 'Buys', Vert
Skip
(Button 'Buys', command: 'buysInvoices', xmin: 200 xstretch:1 ystretch:1)
Skip
(Button 'Products', command: 'buysProducts', xmin: 200 xstretch:1 ystretch:1)
Skip
(Button 'Entities', command: 'buysEntities', xmin: 200 xstretch:1 ystretch:1)
)
(Tab: 'Web', Vert (Button))
(Tab: 'Config', Vert
Skip
(Button 'V.A.T.', command: 'vat', xmin: 200)
Skip
(Button 'Products Groups', command: 'products_groups', xmin: 200)
Skip
(Button 'Order Types', command: 'invoices_kinds', xmin: 200)
Skip
(Button 'Font Size', command: 'font_size', xmin: 200)
)
)
(Statusbar)
)

InvoicesList: false;
On_salesInvoices()
{
Alert('Sales')
}

On_salesProducts()
{
Alert('Products')
}

On_salesEntities()
{
Alert('Entities')
}

On_buysInvoices()
{
Alert('Buys')
}

On_buysProducts()
{
Alert('Buys Products')
}

On_buysEntities()
{
Alert('Buys Entities')
}

On_vat()
{
Alert('VAT')
}
On_products_groups()
{
Alert('Products Groups')
}
On_invoices_kinds()
{
Alert('Invoices Kinds')
}
On_font_size()
{
Alert('Invoices Kinds')
cf = Object()
cf.lStructSize = CHOOSEFONT.Size()
cf.hwndOwner = .Window.Hwnd
cf.lpLogFont = Suneido.stdfont.Copy()
cf.Flags = CFO.SCREENFONTS | CFO.INITTOLOGFONTSTRUCT
if not ChooseFont(cf)
return
//.change_font(cf.lpLogFont)
}
}

 
 
Last Edit: 2010/01/21 12:07 By mingodad.
 
#1820
Re:Why this Tabs doesn't show first tab title ? 7 Months, 2 Weeks ago
When I try this I see the title/caption of the first tab.

I'm wondering if the persistent table has old data in it.
Have you tried deleting the persistent window record, and running it again?
 
 
#1821
Re:Why this Tabs doesn't show first tab title ? 7 Months, 1 Week ago
Yes I did !

I even tested with other suneido versions and the problem remains the same.

Have you tested it with "suneido dadset2" after closing the initial apparently working test ? Because immediately after issue 'PersistentWindow(#(TestTabsTab0) newset: "dadset2")' it shows fine but if you quit it and "suneido dadset2" you can see that there is nothing on the first tab title/caption.
 
 
#1822
Re:Why this Tabs doesn't show first tab title ? 7 Months, 1 Week ago
I was running it from the command line.

Is this intermittent or consistent?
also what version of windows are you running?

I was finally able to see the issue, however it is intermittent for me, (ie: I will run "suneido dadset2" four of five times in a row on the command line, and most times I will not see the issue, occasionally I will see it once, or twice)
 
 
#1823
Re:Why this Tabs doesn't show first tab title ? 7 Months, 1 Week ago
For me it's constant, all the time it doesn't shows the title/caption.

I tested with trunk and with 071021
 
 
#1828
Re:Why this Tabs doesn't show first tab title ? 7 Months, 1 Week ago
are you running Vista? (or Win7?)

I just ran some tests on Win7, Vista and XP,

I can't get it to happen at all on XP, With Vista and Win7 I'm seeing the same results, it happens, but inconsistently.
 
 
#1830
Re:Why this Tabs doesn't show first tab title ? 7 Months, 1 Week ago
I'm using Vista Home Basic.
 
 
#1839
Re:Why this Tabs doesn't show first tab title ? 7 Months ago
Today I tested on windows xp and I get the same result I mentioned, allways none on the first title/caption of tabs.
 
 
#1842
Re:Why this Tabs doesn't show first tab title ? 7 Months ago
maybe a timing issue?

we could change it to set the title at a different point or with Delayed(0
 
 
andrew
 
#1845
Re:Why this Tabs doesn't show first tab title ? 7 Months ago
With Andrew tip I modified my code to have it work till the final solution arise:

Code:


New(@args)
{
super(@args)
.Window.ResizeToMin()
//.Vert.Tabs.SelectTab(1)
.RootWindow = this
Delayed(100, .updateTab0)
}

updateTab0()
{
childs = .Vert.Tabs.GetChildren()
childs[0].SetText(0, 'Sales')
}



 
 
#1856
Re:Why this Tabs doesn't show first tab title ? 7 Months ago
Did you need the 100? Usually 0 works - no delay but goes through message queue so current processing finishes first.

I am always nervous about fixed delays like "100"
 
 
andrew