Ecere SDK/eC Forums • View topic - [Solved]Unresolved identifier




Ecere SDK/eC Forums

Ecere Developers Community

[Solved]Unresolved identifier

General help with the Ecere Cross Platform GUI toolkit: Window, common controls, events, etc.
Help with the 2D Graphics library: Surface, Display, Bitmap, Font and others.

[Solved]Unresolved identifier

Postby samsam598 » Tue Aug 27, 2013 2:36 am

Greetings!

Sorry...but why?
Code: Select all

Compiling...
form1.ec
   form1.ec:53:10: error: unresolved identifier txtWebContent
   form1.ec:53:10: error: member operator on non-structure type expression txtWebContent.Clear
   form1.ec:58:10: error: unresolved identifier txtWeb
   form1.ec:58:10: error: member operator on non-structure type expression txtWeb.Clear         


ec source file:

Code: Select all
 
 import "ecere"
class Form1 : Window
{
   caption = "Read Net File";
   background = formColor;
   borderStyle = fixed;
   hasMaximize = true;
   hasMinimize = true;
   hasClose = true;
   size = { 528, 372 };
   anchor = { horz = -28, vert = -24 };
 
   Label label1 { this, caption = "Which Website:", size = { 84, 21 }, position = { 16, 24 } };
   EditBox txtWebContent
   {     
      this, caption = "editBox1", anchor = { left = 8, top = 56, right = 10, bottom = 13 }, hasHorzScroll = true, true, readOnly = true, true;
 
 
   };
   EditBox txtWeb
   {
      this, size = { 410, 21 }, anchor = { left = 94, top = 24, right = 18 }, contents = "http://www.yahoo.com.cn";
 
      bool OnKeyDown(Key key, unichar ch)
      {
         txtWebContent.Clear();//----------->>>!!
         txtWeb.Clear();           //----------->>>!!
         return EditBox::OnKeyDown(key, ch);
      }
   }
 
   }         
 
Last edited by samsam598 on Tue Aug 27, 2013 5:32 am, edited 1 time in total.
samsam598
 
Posts: 208
Joined: Thu Apr 14, 2011 9:44 pm

Re: Unresolved identifier

Postby redj » Tue Aug 27, 2013 4:19 am

hey samsam598,

Use NotifyKeyDown, which you will use to do something in the event of a keystroke when using any GUI control/widget that implements NotifyKeyDown, instead of the OnKeyDown, which is something you would use to implement the specifics of a custom GUI control/widget.

The Notify* methods will usually have this as the master Window like you're trying to do in your code. The On* on the other hand will have this point to the control itself. The txtWeb instance in this case.

I hope this helps... cheers!

-redj
redj
 
Posts: 107
Joined: Sun Jan 17, 2010 10:03 am

Re: Unresolved identifier

Postby samsam598 » Tue Aug 27, 2013 5:09 am

Hi redj,

It really helps...and the issue's fixed.Thank you!

Cheers,
Sam
samsam598
 
Posts: 208
Joined: Thu Apr 14, 2011 9:44 pm


Return to GUI Toolkit & 2D Graphics

Who is online

Users browsing this forum: No registered users and 3 guests

cron