Search found 212 matches

by samsam598
Thu Nov 29, 2012 2:22 am
Forum: GUI Toolkit & 2D Graphics
Topic: Splash class
Replies: 11
Views: 109601

Re: Splash class

Just found that the splash screen can be closed by closing on the taskbar icon if the splashing time is long enough.The taskbar icon shows up there even if the property showInTaskBar=false. Another issue,recently find that those created forms (projects) times ago inside which those controls who has ...
by samsam598
Thu Nov 29, 2012 1:00 am
Forum: GUI Toolkit & 2D Graphics
Topic: Window inside parent window
Replies: 2
Views: 28712

Re: Window inside parent window

Hi Jerome,

Acutally a DataBox with the FilePath type is exactly what I want.Thank you :D
by samsam598
Tue Nov 27, 2012 4:05 am
Forum: GUI Toolkit & 2D Graphics
Topic: Window inside parent window
Replies: 2
Views: 28712

Window inside parent window

Hi , I made a form which mimics the file selector control,but I don't know how I can place it inside a parent form just like a Button or an EditBox?   import "ecere"   class FileSelector : Window { background = activeBorder; borderStyle = fixed; size = { 608, 124 }; anchor = { horz = -19, ...
by samsam598
Mon Nov 26, 2012 8:02 pm
Forum: eC Language
Topic: Read file by line
Replies: 12
Views: 59105

Re: Read file by line

Bingo!
Appreciated.
by samsam598
Mon Nov 26, 2012 4:43 am
Forum: eC Language
Topic: Read file by line
Replies: 12
Views: 59105

Re: Read file by line

I am sorry but...

Code: Select all

 
~GetInputFromUser()
{
     delete str;
}
 
With this line the program will crash when accepted console input (file name),FileOpen returned null again;commented out this line will work pretty well.I am confused now. :(
by samsam598
Mon Nov 26, 2012 4:12 am
Forum: eC Language
Topic: Read file by line
Replies: 12
Views: 59105

Re: Read file by line

Hi Jerome,

I gained a lot today and I am very :D

By the way,do we have a file selector control which can be placed in a form?
Appreciated!


Regards,
Sam
by samsam598
Mon Nov 26, 2012 2:17 am
Forum: eC Language
Topic: Read file by line
Replies: 12
Views: 59105

Re: Read file by line

I've got it.Thanks Jerome! Below code works pretty well.However I just want to know in the destructor (~GetInputFromUser()) whether the String str should be deleted or not.   import "ecere"   class GetInputFromUser : Window { caption = "Get Input From User"; background = activeBo...
by samsam598
Sun Nov 25, 2012 10:35 pm
Forum: eC Language
Topic: Read file by line
Replies: 12
Views: 59105

Re: Read file by line

Hi Jerome,

Just checked that it indeed returned null.

Code: Select all

 
if(!file) 
      {
         printf("Failed to open\n");
         exit(-1);
      } 
 
So how can I pass a Chinese character file name to byLine(...) function?Thanks.
by samsam598
Sun Nov 25, 2012 9:52 pm
Forum: eC Language
Topic: Read file by line
Replies: 12
Views: 59105

Re: Read file by line

Hi Jerome, Thanks for the prompt response! scanf("%[^\n]",variable) will read a line of string even if it contains whitespace,like c:\program files.----This is grom google. :D But for this thread,revising back to scanf("%s",filename) suffices. The file I am talking about is exist...
by samsam598
Sun Nov 25, 2012 8:58 pm
Forum: eC Language
Topic: Read file by line
Replies: 12
Views: 59105

Read file by line

Greetings! Given below code,from the console when enter a file name which contains Chinese characters,the program will crashed.What should I do?Thanks!!   import "ecere"   class App:Application { public: uint16* wstring(char* str) { uint16* result=UTF8toUTF16(str,null); return result;   //...