SmartOpenFile issue [OP]EditBox.HasXXScroll issue
SmartOpenFile issue [OP]EditBox.HasXXScroll issue
Greetings!
I tested with the lasted and found even I've set Editbox.HasHorzScroll=true and HasVertScroll=true,
and even the text content is long enough,when the window shows up,the VScroll and HScroll bar are both invisible.Now if I resize the form with the form's right bottom,both show up now.
Regards,
Sam
I tested with the lasted and found even I've set Editbox.HasHorzScroll=true and HasVertScroll=true,
and even the text content is long enough,when the window shows up,the VScroll and HScroll bar are both invisible.Now if I resize the form with the form's right bottom,both show up now.
Regards,
Sam
Last edited by samsam598 on Tue Aug 27, 2013 5:43 am, edited 1 time in total.
Re: EditBox.HasXXScroll issue
Thanks Sam!
I've created a Mantis issue for you: http://ecere.com/mantis/view.php?id=734
I will look into this. It might have to do with an optimization I did for scroll bars last week.
Regards,
Jerome
I've created a Mantis issue for you: http://ecere.com/mantis/view.php?id=734
I will look into this. It might have to do with an optimization I did for scroll bars last week.
Regards,
Jerome
Re: EditBox.HasXXScroll issue
Just wanna know whether this issue has been fixed or not.tks.jerome wrote:Thanks Sam!
I've created a Mantis issue for you: http://ecere.com/mantis/view.php?id=734
I will look into this. It might have to do with an optimization I did for scroll bars last week.
Regards,
Jerome
Re: EditBox.HasXXScroll issue
Hi Sam!
No, as the status of the issue points out, I was awaiting feedback from you...
I'm not sure I understand the problem and/or how to reproduce it.
Could you please give me some code and steps to reproduce the problem?
Thanks,
Jerome
No, as the status of the issue points out, I was awaiting feedback from you...
I'm not sure I understand the problem and/or how to reproduce it.
Could you please give me some code and steps to reproduce the problem?
Thanks,
Jerome
Re: EditBox.HasXXScroll issue
Sorry my bad.Just re-ran the program and found it works perfect now.
Btw,the SmartFileOpen function is really great!!It works perfect as well with asia (Chinese) characters!!
Btw,the SmartFileOpen function is really great!!It works perfect as well with asia (Chinese) characters!!
Code: Select all
import "ecere"
File SmartFileOpen(char * fileName)
{
bool opened = false;
HTTPFile f { };
char relocation[MAX_LOCATION * 4];
char location[MAX_LOCATION * 4];
strcpy(location, fileName);
while(!opened)
{
if(!(opened = f.OpenURL(location, null, relocation)) && !strcmp(location, relocation))
break;
if(!opened)
printf("Relocated to %s\n", relocation);
if(location[strlen(location)-1] != '/')
PathCat(location, "..");
if(relocation[0] == '/' && relocation[1] == '/')
{
strcpy(location, "http:");
strcat(location, relocation);
}
else
PathCat(location, relocation);
}
if(!opened)
delete f;
return f;
}
class Form1 : Window
{
caption = "读取文件";
background = activeBorder;
borderStyle = sizable;
hasMaximize = true;
hasMinimize = true;
hasClose = true;
size = { 200, 228 };
anchor = { horz = -192, vert = -96 };
EditBox editBox1 { this, caption = "editBox1", anchor = { left = 8, top = 16, right = 10, bottom = 13 }, hasHorzScroll = true, true, readOnly = true, true };
bool OnPostCreate(void)
{
File file=SmartFileOpen("http://www.hao123.com");
//File file=SmartFileOpen("http://www.yahoo.com.cn");
//File file=FileOpen("form1.ec",read);
//File file=SmartFileOpen("https://webasia.columbia.com/exchange");
editBox1.Load(file);
delete(file);
return true;
}
}
Form1 form1 {};
Re: EditBox.HasXXScroll issue
Just found it.Please see comments in the source.
Code: Select all
File file=SmartFileOpen("http://www.yahoo.com");//works perfect
File file=SmartFileOpen("https://www.yahoo.com");//crashed
File file =SmartFileOpen("//www.yahoo.com");//crashed;
File file=SmartFileOpen("www.yahoo.com");//nothing get,possibly timeout or something else
//Test below two very popular Chinese website:
File file=SmartFileOpen("http://www.hao123.com");//sometimes nothing get;sometimes perfect
//This websiet never goes down,it is very stable and fast
File file=SmartFileOpen("http://www.taobao.com");//got information which containes unrecognizable characters
Re: SmartOpenFile issue [OP]EditBox.HasXXScroll issue
Hi Sam,
The HTTPFile class does not support the https protocol at the moment.
I'm not sure all that would be required to support it, we already have a SSLSocket class for connecting through OpenSSL in the extras . Contribution in this area would be much appreciated There is also the possibility of using libcurl.
// is not recognized as an HTTP address when passed directly with OpenURL (Will look into the crash, at least it shouldn't crash)
www. is not recognized as an HTTP address either when opened with OpenURL.
You'd need to add the http:// in front
As for hao123 and taobao, I've had reports and seen myself that HTTPFile is suffering from a few problems lately. I am hoping to find the time to look at these this week. Will keep you posted!
Regards,
Jerome
The HTTPFile class does not support the https protocol at the moment.
I'm not sure all that would be required to support it, we already have a SSLSocket class for connecting through OpenSSL in the extras . Contribution in this area would be much appreciated There is also the possibility of using libcurl.
// is not recognized as an HTTP address when passed directly with OpenURL (Will look into the crash, at least it shouldn't crash)
www. is not recognized as an HTTP address either when opened with OpenURL.
You'd need to add the http:// in front
As for hao123 and taobao, I've had reports and seen myself that HTTPFile is suffering from a few problems lately. I am hoping to find the time to look at these this week. Will keep you posted!
Regards,
Jerome
Re: SmartOpenFile issue [OP]EditBox.HasXXScroll issue
Hi Sam,
I've opened the following ticket regarding this issue:
http://ecere.com/mantis/view.php?id=997
I've done some debugging, but still not quite sure what's causing the hangups. I will investigate further.
Regards,
Jerome
I've opened the following ticket regarding this issue:
http://ecere.com/mantis/view.php?id=997
I've done some debugging, but still not quite sure what's causing the hangups. I will investigate further.
Regards,
Jerome
Re: SmartOpenFile issue [OP]EditBox.HasXXScroll issue
Hi Sam,
Regarding http://www.taobao.com , the server is serving text encoded in the GBK charset (Guojia Biaozhun - 国家标准), for which there is no support in Ecere at this time. Ecere currently only understands ASCII, ISO-8859-1 and UTF-8. You would need to first convert the text data into UTF-8 for it to display properly using the Ecere API.
I believe I've solved a lot of the issues with the HTTPFile class, and will be pushing some commits to the master branch soon. I might look at what is required to support https as well sometime soon.
Regards,
Jerome
Regarding http://www.taobao.com , the server is serving text encoded in the GBK charset (Guojia Biaozhun - 国家标准), for which there is no support in Ecere at this time. Ecere currently only understands ASCII, ISO-8859-1 and UTF-8. You would need to first convert the text data into UTF-8 for it to display properly using the Ecere API.
I believe I've solved a lot of the issues with the HTTPFile class, and will be pushing some commits to the master branch soon. I might look at what is required to support https as well sometime soon.
Regards,
Jerome
Re: SmartOpenFile issue [OP]EditBox.HasXXScroll issue
Appreciated.SmartFileOpen actually's done a great job.Even using some down and dirty c libs ,it can't be better as I far as I tested regarding the different locale or encoding issue.Per my experience on C/C++with WxWidgets,D,Lazaurs,eC provided the best crossplatfrom compatiblity.In eC I can talk with MS Access easily and proper handle/interact Chinese character with backend Access database,but in all others I've mentioned above,I encountered a lot of issues and Asian/Chinese character issue is not a issue that many developers who are interested in so there is rarely a known or prompt solution come up.
Right at this moment,my issue with eC is when I tried to use a existing c lib(again in pure c project it works pretty good) in eC project,compiler often complains such as "error :expected ';' , '.' , ')' ,'asm' or '__attribute__' before '*' token etc.Each time when I encountered such an issue,I am quite cofused and depressed.I don't know is the c lib using some extra features like the one I encountered before,say curl,that is,it is the problem of the c lib itself,or a common issue that when there is some #define issue when the lib headers been included/imported in an eC project.I don't know either whethere in eC the current 'namespace' can help to avoid the issue.
Regards,
Sam
Right at this moment,my issue with eC is when I tried to use a existing c lib(again in pure c project it works pretty good) in eC project,compiler often complains such as "error :expected ';' , '.' , ')' ,'asm' or '__attribute__' before '*' token etc.Each time when I encountered such an issue,I am quite cofused and depressed.I don't know is the c lib using some extra features like the one I encountered before,say curl,that is,it is the problem of the c lib itself,or a common issue that when there is some #define issue when the lib headers been included/imported in an eC project.I don't know either whethere in eC the current 'namespace' can help to avoid the issue.
Regards,
Sam