Tags: array, attempt, deploy, deply, field, gui, java, javabuilder, matlab, netbeans, non-structure, programming, reference, software, toolbox

"Attempt to reference field of non-structure array"

On Programmer » Matlab

4,948 words with 2 Comments; publish: Mon, 28 Apr 2008 20:04:00 GMT; (20046.88, « »)

Hello. I am trying to deploy my Matlab GUI using Java (Netbeans).

I used javabuilder toolbox in Matlab to deply my GUI.

Now in Netbeans Software, i can run my GUI, but when i press a

pushbutton, to show a file selector, there is this following error

shown :

----

---

Attempt to reference field of non-structure array.

Error in ==>

AbstractFileDialog.AbstractFileDialog>AbstractFileDialog.setPeerTitle

at 111

Error in ==> UiFileOpenDialog.UiFileOpenDialog>UiFileOpenDialog.show

at 37

Error in ==> uitools\private\uigetputfile_helper at 46

Error in ==> uigetfile at 125

Error in ==> gui4dataload>pushbutton2_Callback at 93

Error in ==> gui_mainfcn at 95

Error in ==> gui4dataload at 42

? Error using ==> gui4dataload('pushbutton2_Callback',gcbo

,

[],guidata(gcbo))

Attempt to reference field of non-structure array.

? Error while evaluating uicontrol Callback

----

----

gui4dataload is my fig and m-file name

and pushbutton2, when pressed, will show the file selector.

I guess this is some deploying file selector/uigetfile error but i am

not sure how to fix it.

In my gui4dataload m-file in my pushbutton2 function i have the

command "uigetfile" to open the file selector.

My GUI works perfectly fine in MATLAB. I mean i can show the file

selctor by pressing the button and select the respective file. But I

am new to Netbeans and so i am not sure how to fix this problem.

Please Help. Any help is appreciated. Thank you so much. :)

All Comments

Leave a comment...

  • 2 Comments
    • Hey,

      It sounds like I'm working on a similar setup to you. Just backwards

      I've developed a GUI in Netbeans that I'm trying to run through

      Matlab. How successful have you been trying this your way? I've been

      unable to import my java GUI into Matlab properly. Been getting alot

      of the "Attempt to reference field of non-structure array." messages

      in Matlab.

      Why are you trying to run a Matlab GUI in Netbeans? Most people work

      the other way around...

      I've had to upgrade my version of Java on Matlab to 1.6 but I get the

      above error message when I try to add it to the class path (using

      javaaddpath)

      Is your Matlab GUI made in 1.6? Netbeans is a 1.6 environment.

      Maybe we can work together from different ends.

      Craig

      On Nov 25, 7:48 am, banani1106.matlab.todaysummary.com.yahoo.com wrote:

      > Hello. I am trying to deploy my Matlab GUI using Java (Netbeans).

      > I used javabuilder toolbox in Matlab to deply my GUI.

      > Now in Netbeans Software, i can run my GUI, but when i press a

      > pushbutton, to show a file selector, there is this following error

      > shown :

      > ----

      ----

      > Attempt to reference field of non-structure array.

      > Error in ==>

      > AbstractFileDialog.AbstractFileDialog>AbstractFileDialog.setPeerTitle

      > at 111

      > Error in ==> UiFileOpenDialog.UiFileOpenDialog>UiFileOpenDialog.show

      > at 37

      > Error in ==> uitools\private\uigetputfile_helper at 46

      > Error in ==> uigetfile at 125

      > Error in ==> gui4dataload>pushbutton2_Callback at 93

      > Error in ==> gui_mainfcn at 95

      > Error in ==> gui4dataload at 42

      > ? Error using ==> gui4dataload('pushbutton2_Callback',gcbo

      ,

      > [],guidata(gcbo))

      > Attempt to reference field of non-structure array.

      > ? Error while evaluating uicontrol Callback

      > ----

      ----

      --

      > gui4dataload is my fig and m-file name

      > and pushbutton2, when pressed, will show the file selector.

      > I guess this is some deploying file selector/uigetfile error but i am

      > not sure how to fix it.

      > In my gui4dataload m-file in my pushbutton2 function i have the

      > command "uigetfile" to open the file selector.

      > My GUI works perfectly fine in MATLAB. I mean i can show the file

      > selctor by pressing the button and select the respective file. But I

      > am new to Netbeans and so i am not sure how to fix this problem.

      > Please Help. Any help is appreciated. Thank you so much. :)

      #1; Mon, 28 Apr 2008 20:05:00 GMT
    • hey thanks for replying.

      Oh i didn't know that most people work the other way around. I am

      doing so, because if i deploy my matlab GUI in Java, then i can open

      my GUI even if i do not have Matlab software in the PC, as in, I can

      open in any PC. Well, that is what i am told..

      I am not sure how do you see the environment in Matlab.

      How successful i have been in doing this? hmmm well i have created a

      class and created an object for my Matlab GUI. I can run it but there

      is this "attempt to ref. field of non structure array "error. when i

      click a button.

      i am not sure how to change the matlab environment. Please let me

      know. And once again, thank you so much.

      --Banani

      #2; Mon, 28 Apr 2008 20:07:00 GMT