|
|
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Скрипт (сканинг файлов) который работал прекрасно на 8 и 9 не работает на 10! Билдер падает по своему желанию когда захочет ( В чем дело понять не могу. HELPPPPPPP ME PLZ! Сделал отладочное окно для проверки ошибки.... Вот скрипт окна: .... для тестового окна надоть файлы с расширением *.sru в каталоге теста (по умолчанию C:\temp) $PBExportHeader$w_tmp.srw forward global type w_tmp from window end type type mle_1 from multilineedit within w_tmp end type type sle_1 from singlelineedit within w_tmp end type type cb_1 from commandbutton within w_tmp end type type win32_find_dataa from structure within w_tmp end type type filetime from structure within w_tmp end type end forward type win32_find_dataa from structure unsignedlong dwfileattributes filetime ftcreationtime filetime ftlastaccesstime filetime ftlastwritetime unsignedlong nfilesizehigh unsignedlong nfilesizelow unsignedlong dwreserved0 unsignedlong dwreserved1 character cfilename[260] character calternatefilename[14] end type type filetime from structure unsignedlong dwlowdatetime unsignedlong dwhighdatetime end type global type w_tmp from window integer width = 1010 integer height = 1396 boolean titlebar = true string title = "Untitled" boolean controlmenu = true boolean minbox = true boolean maxbox = true boolean resizable = true long backcolor = 67108864 string icon = "AppIcon!" boolean center = true mle_1 mle_1 sle_1 sle_1 cb_1 cb_1 end type global w_tmp w_tmp type prototypes Function ulong FindFirstFileA (string lpFileName, ref WIN32_FIND_DATAA lpFindFileData) Library "KERNEL32.DLL" Alias for "FindFirstFileA;Ansi" Function boolean FindNextFileA (ulong hFindFile, ref WIN32_FIND_DATAA lpFindFileData) Library "KERNEL32.DLL" Alias for "FindNextFileA;Ansi" end prototypes forward prototypes public function boolean of_getbit (long al_decimal, unsignedinteger ai_bit) public function integer of_getfilelist (string as_rootdirectory, string as_filemask, boolean ab_subdirectory, ref string as_filename[]) public function integer of_getsubdirectories (string as_rootdirectory, ref string as_filename[]) end prototypes public function boolean of_getbit (long al_decimal, unsignedinteger ai_bit);Boolean lb_null //Check parameters If IsNull(al_decimal) or IsNull(ai_bit) then SetNull(lb_null) Return lb_null End If //Assumption ai_bit is the nth bit counting right to left with //the leftmost bit being bit one. //al_decimal is a binary number as a base 10 long. If Int(Mod(al_decimal / (2 ^(ai_bit - 1)), 2)) > 0 Then Return True End If Return False end function public function integer of_getfilelist (string as_rootdirectory, string as_filemask, boolean ab_subdirectory, ref string as_filename[]);WIN32_FIND_DATAA lpFindFileData ULong lul_handle Long ll_count String ls_dirmask = '*' String ls_filename String ls_subdirectory[] Integer li_i,li_up String ls_tmp ll_count = UpperBound(as_filename) //File ls_tmp = as_rootdirectory+'\'+as_filemask lul_handle = FindFirstFileA(ls_tmp,lpFindFileData) do while lul_handle >0 if Not of_GetBit(Long(lpFindFileData.dwFileAttributes),5) then ls_filename = Trim(lpFindFileData.cFileName) lpFindFileData.cFileName = '' if Len(ls_filename) > 0 then ll_count ++ if ab_subdirectory then ls_filename = as_rootdirectory+'\'+ls_filename as_filename[ll_count] = ls_filename end if end if if Not FindNextFileA(lul_handle,lpFindFileData) then EXIT loop //SubDirectory if ab_subdirectory then li_up = of_GetSubDirectories(as_rootdirectory,ls_subdirectory) For li_i = 1 to li_up of_GetFileList(as_rootdirectory + '\'+ls_subdirectory[li_i],as_filemask,ab_subdirectory,as_filename) Next end if Return UpperBound(as_filename) end function public function integer of_getsubdirectories (string as_rootdirectory, ref string as_filename[]);WIN32_FIND_DATAA lpFindFileData ULong lul_handle Long ll_count String ls_dirmask = '*' String ls_filename String ls_tmp ls_tmp = as_rootdirectory+'\'+ls_dirmask lul_handle = FindFirstFileA(ls_tmp,lpFindFileData) do while lul_handle >0 ls_filename = Trim(lpFindFileData.cFileName) lpFindFileData.cFileName = '' if Len(ls_filename) > 0 then if Not(ls_filename ='.' Or ls_filename = '..') then if of_GetBit(lpFindFileData.dwFileAttributes,5) then ll_count ++ as_filename[ll_count] = ls_filename end if end if end if if Not FindNextFileA(lul_handle,lpFindFileData) then EXIT loop Return UpperBound(as_filename) end function on w_tmp.create this.mle_1=create mle_1 this.sle_1=create sle_1 this.cb_1=create cb_1 this.Control[]={this.mle_1,& this.sle_1,& this.cb_1} end on on w_tmp.destroy destroy(this.mle_1) destroy(this.sle_1) destroy(this.cb_1) end on type mle_1 from multilineedit within w_tmp integer y = 308 integer width = 928 integer height = 880 integer taborder = 20 integer textsize = -10 integer weight = 400 fontcharset fontcharset = russiancharset! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Arial" long textcolor = 33554432 boolean hscrollbar = true boolean vscrollbar = true borderstyle borderstyle = stylelowered! end type type sle_1 from singlelineedit within w_tmp integer y = 4 integer width = 891 integer height = 112 integer taborder = 10 integer textsize = -10 integer weight = 400 fontcharset fontcharset = russiancharset! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Arial" long textcolor = 33554432 string text = "c:\temp" borderstyle borderstyle = stylelowered! end type type cb_1 from commandbutton within w_tmp integer x = 201 integer y = 172 integer width = 402 integer height = 112 integer taborder = 10 integer textsize = -10 integer weight = 400 fontcharset fontcharset = russiancharset! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Arial" string text = "Test" end type event clicked;int li_i,li_up String FileList[] li_up = of_GetFileList(sle_1.Text,'*.sr?',False,FileList) mle_1.Text='' For li_i=1 to li_up mle_1.Text=mle_1.Text+'~r~n'+FileList[li_i] Next end event ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 16:50 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Что-то ваш srw импортироваться не хочет. Файл прицепите. Билд какой у вас? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 17:23 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Последний официальный естественно) неофициальные давненько я не качал. и уже не знаю как это делается сейчас. 10.0.5064 ЗЫ PB то падает то не падает. особенно часто падает если файливо побольше и кнопочку нажимать тож побольше =) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 17:41 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Чего то файлик крепится не хочет. пробую еще раз. кстати про импорт текста. может быть надо в Юникоде аго пихать? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 17:44 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Andrew Nagorny Последний официальный естественно) неофициальные давненько я не качал. и уже не знаю как это делается сейчас. 10.0.5064 ЗЫ PB то падает то не падает. особенно часто падает если файливо побольше и кнопочку нажимать тож побольше =) У билда 5064 есть проблемы связанные с менеджментом памяти! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 17:53 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Какие? ссылочку можно? Пробовал на предыдущем билде та же самая картина. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 17:57 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Andrew NagornyПоследний официальный естественно) неофициальные давненько я не качал. и уже не знаю как это делается сейчас. 10.0.5064 Странно, мы получили коробку пару недель назад и у нас 4510... Собран 25 июня. У вас evaluation или купленный? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 17:59 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Eval естественно... все пробую и пробую. все распробовать не могу. а 5064 с сайта сайбейса качал. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 18:02 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Проблема закрыта! Спасибо "Aliaksei Hlinski" <glinskiГАВГАВtut.by.NO_SPAM> ---------------------------------------------------------------- > type prototypes > Function ulong FindFirstFileA (string lpFileName, ref WIN32_FIND_DATAA > lpFindFileData) Library "KERNEL32.DLL" Alias for "FindFirstFileA;Ansi" > Function boolean FindNextFileA (ulong hFindFile, ref WIN32_FIND_DATAA > lpFindFileData) Library "KERNEL32.DLL" Alias for "FindNextFileA;Ansi" > end prototypes IMHO iz-za etogo ... poprobuy zamenit' na FindFirstFileW / FindNextFileW ??? ---------------------------------------------------------------- Все прекрасно заработало! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 18:09 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Andrew Nagorny Какие? ссылочку можно? Ссылочки нет, собственные наблюдения и общение с SYBASE. Enlighten me Странно, мы получили коробку пару недель назад и у нас 4510... Собран 25 июня. У вас evaluation или купленный? Для увеличения билда надо качать с SYBASE.COM. Эти EBF официальные. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 18:12 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Может попробовать перейти с ансишных функций на юникодовские, ИМХО, может помочь... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 18:12 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Упс... Сами догадались, ну и гуд. 2Guest - а что, уже появились EBF к десятке? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 18:15 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
Enlighten me 2Guest - а что, уже появились EBF к десятке? http://downloads.sybase.com/swd/base.do ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 18:22 |
|
||
|
Проблема с 10
|
|||
|---|---|---|---|
|
#18+
_Guest_1 Enlighten me 2Guest - а что, уже появились EBF к десятке? http://downloads.sybase.com/swd/base.do Да, спасибо, уже нашел - два EBF последний от 26 октября. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.11.2004, 18:23 |
|
||
|
|

start [/forum/topic.php?fid=15&msg=32780523&tid=1338719]: |
0ms |
get settings: |
11ms |
get forum list: |
14ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
159ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
47ms |
get tp. blocked users: |
1ms |
| others: | 239ms |
| total: | 490ms |

| 0 / 0 |

Извините, этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
... ля, ля, ля ...