Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Rendering Grid offscreen #262

Open
hyyan opened this issue Feb 23, 2024 · 0 comments
Open

[Bug] Rendering Grid offscreen #262

hyyan opened this issue Feb 23, 2024 · 0 comments
Assignees
Labels
Client: BUI the issues is related to BUI applications Status: Confirmed The issue is a bug and has been confirmed and an action will be taken Type: Bug The issue documents broken, incorrect, or confusing behavior.

Comments

@hyyan
Copy link
Member

hyyan commented Feb 23, 2024

We have programs where we build the grid offscreen before showing the window, and it does not appear to work in BUI. However, the sample I made works in DWC.

currenlty, this fails in BUI with the following error.:

TypeError: Cannot read properties of null (reading '$gw_wnd')

use ::BBjGridExWidget/BBjGridExWidget.bbj::BBjGridExWidget
 
a = new GridSample()
release
 
class public GridSample
    field public BBjWindow win!
    field public BBjButton btn!
 
    field public BBjWindow secondWindow!
 
    field public BBjSysGui gui!
    
    method public GridSample()
        guiChan! = unt; open (guiChan!)"X0"
        #gui! = BBjAPI().getSysGui()
        #win! = #gui!.addWindow(0, 0, 200, 200, "Grid Sample", $00001000$)
        btn! = #win!.addButton(3213, 10, 10, 100, 20,  "Show Grid Window")
        btn!.setCallback(btn!.ON_BUTTON_PUSH, #this!, "showSecondWindow")
 
        #secondWindow! = #gui!.addWindow(93201, 9, 0, 700, 350, "edit window", $00001012$)
        grid! = new BBjGridExWidget(#secondWindow!, #secondWindow!.getAvailableControlID(), 10, 75, 610, 320)
 
        #secondWindow!.setCallback(#secondWindow!.ON_CLOSE, #this!, "closeSecondWindow")
 
        process_events
    methodend
 
    method public void showSecondWindow(BBjEvent e!)
        #secondWindow!.setVisible(1)
    methodend
 
    method public void closeSecondWindow(BBjEvent e!)
        #secondWindow!.setVisible(0)
        #win!.focus()
    methodend
 
classend
@hyyan hyyan added Type: Bug The issue documents broken, incorrect, or confusing behavior. Client: BUI the issues is related to BUI applications Status: Confirmed The issue is a bug and has been confirmed and an action will be taken labels Feb 23, 2024
@hyyan hyyan self-assigned this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client: BUI the issues is related to BUI applications Status: Confirmed The issue is a bug and has been confirmed and an action will be taken Type: Bug The issue documents broken, incorrect, or confusing behavior.
Projects
None yet
Development

No branches or pull requests

1 participant