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

‘dispose’ is not a valid field or method name for reference class “GBasicDialog” #103

Open
selesnow opened this issue Jan 16, 2021 · 7 comments

Comments

@selesnow
Copy link

selesnow commented Jan 16, 2021

Hello!

Thank for gWidgets2

When i try apply dispose() to gbasicdialog object i get error: ‘dispose’ is not a valid field or method name for reference class “GBasicDialog”.

Minimal example:

library(gWidgets2)
library(gWidgets2tcltk)

library(gWidgets2)
library(gWidgets2tcltk)

auth_win <- gbasicdialog("BI Data Uploader System v 2.0",visible  = F,do.buttons=FALSE)

gbutton("Cancel", container = auth_win,handler = function(h,...) {
  dispose(auth_win)
})

How i can close gbasicdialog?

@selesnow
Copy link
Author

selesnow commented Jan 16, 2021

I finded reason on this error.

Code of gWidgets2:::dispose.GBasicDialog()

```r
function (obj, ...) 
{
    obj$dispose()
}

But obj does't has $dispose() methode, it has $dispose_window() methode.

You can change to:

function (obj, ...) 
{
    obj$dispose_window()
}

@selesnow
Copy link
Author

I sended pull request with bug fix.

@OskarHansson
Copy link

@selesnow, I have the same issue. @jverzani will it be fixed in the next version?

@selesnow
Copy link
Author

@OskarHansson

Hello, i am fixed this issue, you can install package from my fork https://github.com/selesnow/gWidgets2

@OskarHansson
Copy link

@selesnow Thanks, I might do that. But I hope your/a solution will get implemented in the next release.

@jverzani
Copy link
Owner

Sorry, this is my fault. I wanted to put the gWidgets stuff in a single github name (not mine) but gWidgets2 was taken. So the repositories here: https://github.com/gWidgets3 are where you can make PRs. I don't know why I didn't set things up to redirect, likely ignorance and low enough activity to think it would be an issue. Anyways, if you want to add a PR on the active repository I can merge it in and try to get passed the CRAN guards.

@OskarHansson
Copy link

I posted this as a new issue in the correct repository as a reminder. I have reworked my code to use a gconfirm dialog instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants