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

DataDialog:ToolBar returns always NULL, even if a toolbar object is assigned #1660

Open
cpyrgas opened this issue Dec 24, 2024 · 2 comments
Open
Assignees
Milestone

Comments

@cpyrgas
Copy link

cpyrgas commented Dec 24, 2024

https://www.xsharp.eu/forum/topic?p=32384#p32384

Attached sample fails with an ArgumentNullException on this code

METHOD PostInit(oWindow,iCtlID,oServer,uExtra) // datadialog
    SELF:Menu := StandardShellMenu{}
    SELF:ToolBar := SELF:Menu:toolbar // menu does have a toolbar
    SELF:ToolBar:Show() // null exception here 

VOMDIApp3.zip

@cpyrgas cpyrgas added this to the 2.2 milestone Dec 24, 2024
@cpyrgas cpyrgas self-assigned this Dec 24, 2024
@github-project-automation github-project-automation bot moved this to To do in Build 2.x Dec 24, 2024
@cpyrgas
Copy link
Author

cpyrgas commented Dec 24, 2024

Problem is because of this code in ChildAppWindow.prg:

ACCESS ToolBar
	IF oImp IS AppWindow VAR appWnd
		RETURN appWnd:Toolbar
	ENDIF

Original code in VO was checking for the Window class instead of AppWindow.

cpyrgas pushed a commit that referenced this issue Dec 24, 2024
@cpyrgas
Copy link
Author

cpyrgas commented Dec 24, 2024

Should be fixed

@cpyrgas cpyrgas moved this from To do to Needs testing in Build 2.x Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs testing
Development

No branches or pull requests

1 participant