Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resolved 1.7.5.5 tabview bug
02-24-2018, 08:17 AM (This post was last modified: 04-21-2018 12:52 AM by bbjimmy.)
Post: #1
Resolved 1.7.5.5 tabview bug
On the current build of yab is a Tabview error.

I create a test app to check a bug reported by bbjimmy and thaflo. Here the tabview crashed then you browsing over the view after removing the tabview with VIEW REMOVE.

I does not have this problem on my system, but i see another one. In my test app i create a tabview with two tabs. on the first one i place a button.

Then i remove the view and create the tabviews again. Here is the button not on the first, it is on the second tab.

https://codeshare.io/al9NJY
Find all posts by this user
Quote this message in a reply
03-10-2018, 07:05 AM (This post was last modified: 03-10-2018 07:30 AM by bbjimmy.)
Post: #2
RE: 1.7.5.5 tabview bug
I have not been able to get tabview working as it should. I guess my c++ and understanding of the tabview code in Haiku isn't good enough.

As a work-around, I have am making a tabview in yab as a library. I have tested it in your code as a replacement for yabs built-in tabview and it seems to be working.

[Image: tabtest.png]
Code:
screenWidth = peek("desktopwidth")
screenHeight = peek("desktopheight")
import yabtab


window open screenWidth/2-200, screenHeight/2-200 to screenWidth/2+200, screenHeight/2+200, "MainWindow", "Test"

    VIEW 0,0 TO 400,320, "BackgroundView","MainWindow"
    x=yabtab( 5,2 , 395,300,"Test","top","BackgroundView")
    //TABVIEW 5,2 TO 395,300, "Test", "top", "BackgroundView"
        view$=tabadd$("Test", "Tab1")
        //TABVIEW ADD "Test",  "Tab1"
            BUTTON 5,5 TO 105,25, "BT:Hui", "Hui",view$
        view1$=tabadd$("Test", "Tab2")
        //TABVIEW ADD "Test",  "Tab2"
        
        

    BUTTON 5,350 TO 100,375, "BT:Remove", "Remove", "MainWindow"
    BUTTON 105,350 TO 200,375, "BT:Add", "Add", "MainWindow"

dim part$(1)

inloop = true
while(inloop)
    msg$ = message$
    
    if (split(msg$, part$(), ":|") > 2) then
        PartOne$=part$(1)
        PartTwo$ = part$(2)
        PartThree$ = part$(3)
    fi
    
    if (split(msg$, part$(), ":|") > 3) then
        PartFour$ = part$(4)
    fi

    if (msg$ <> "")  print msg$
    switch msg$
    
    //Cases
    
    case "BT:Add|"
        //VIEW 0,0 TO 400,320, "BackgroundView","MainWindow"
        x=yabtab( 5,2 , 395,300,"Test","top","BackgroundView")
    //TABVIEW 5,2 TO 395,300, "Test", "top", "BackgroundView"
        view$=tabadd$("Test", "Tab1")
        //TABVIEW ADD "Test",  "Tab1"
            BUTTON 5,5 TO 105,25, "BT:Hui", "Hui",view$
        view1$=tabadd$("Test", "Tab2")
        //TABVIEW ADD "Test",  "Tab2"
        
            
        break

    case "BT:Remove|"
        //VIEW REMOVE "BackgroundView"
         if VIEW GET "containerTest","exists" yabtabremove("Test")
        break
    
    case "MainWindow:_QuitRequested|"
        WINDOW CLOSE "MainWindow"
        break


    default:
    
    end switch
    
    if VIEW GET "containerTest","exists" checktabclick()        
    if(window count<1) inloop = false
    sleep 0.1    
    wend

So far the only option is top, and the library needs to be reformatted to remove all my troubleshooting stuff, but it works!

Fat Elk Sortware
Visit this user's website Find all posts by this user
Quote this message in a reply
03-16-2018, 04:04 AM
Post: #3
RE: 1.7.5.5 tabview bug
I now have the library working with bottom tabs:

[Image: bottomtabs.png]

Fat Elk Sortware
Visit this user's website Find all posts by this user
Quote this message in a reply
03-20-2018, 03:46 AM (This post was last modified: 03-20-2018 03:53 AM by bbjimmy.)
Post: #4
RE: 1.7.5.5 tabview bug
I have a working yabtab.yab library. The attatched zip includes the library, images used to create the tabs, and a test program to demonstrate the use.


Attached File(s)
.zip  yabtablibrary.zip (Size: 11.18 KB / Downloads: 0)

Fat Elk Sortware
Visit this user's website Find all posts by this user
Quote this message in a reply
04-16-2018, 12:42 PM (This post was last modified: 04-16-2018 01:00 PM by bbjimmy.)
Post: #5
RE: 1.7.5.5 tabview bug
Getting some new info from KapiX... https://github.com/bbjimmy/YAB/pull/6#is...-381464218 and https://www.freelists.org/post/haiku-dev...g-BTabView

Fat Elk Sortware
Visit this user's website Find all posts by this user
Quote this message in a reply
04-21-2018, 12:50 AM
Post: #6
RE: 1.7.5.5 tabview bug
The issue has been resolved.

https://github.com/bbjimmy/YAB/commit/44...15645a3cb4

Many Thanks to KapiX, Kacper Kasper for all the help.

Fat Elk Sortware
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Free Web Hosting