<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=63&amp;t=23489&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2021-01-05T07:37:29+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=63&amp;t=23489&amp;mode</id>
<entry>
<author><name><![CDATA[tfosik]]></name></author>
<updated>2021-01-05T07:37:29+01:00</updated>
<published>2021-01-05T07:37:29+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230438#p230438</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230438#p230438"/>
<title type="html"><![CDATA[Re: Deklaracja funkcji]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230438#p230438"><![CDATA[
Trochę tu:<br /><!-- m --><a class="postlink" href="https://www.b4x.com/android/forum/threads/variables-and-subs-visibility.18628/" >https://www.b4x.com/android/forum/threa ... ity.18628/</a><!-- m --><br />i tu:<br /><!-- m --><a class="postlink" href="https://www.b4x.com/android/forum/threads/should-i-use-dim-or-public-and-private.122879/#post-767596" >https://www.b4x.com/android/forum/threa ... ost-767596</a><!-- m --><br />i jeszcze trochę tu:<br /><!-- m --><a class="postlink" href="https://www.b4x.com/android/forum/threads/dim-private-public.59073/#post-415553" >https://www.b4x.com/android/forum/threa ... ost-415553</a><!-- m --><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=18769">tfosik</a> — 5 sty 2021, o 07:37</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[kozaczi]]></name></author>
<updated>2021-01-05T00:35:57+01:00</updated>
<published>2021-01-05T00:35:57+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230436#p230436</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230436#p230436"/>
<title type="html"><![CDATA[Re: Deklaracja funkcji]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230436#p230436"><![CDATA[
Panowie czym się różni zapis: <br />    [syntax=c]Private consPortTx=&quot;17145&quot; As String[/syntax] od  [syntax=c]Dim  consPortTx=&quot;17145&quot; As String[/syntax] ?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1255">kozaczi</a> — 5 sty 2021, o 00:35</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[tfosik]]></name></author>
<updated>2020-12-27T18:59:30+01:00</updated>
<published>2020-12-27T18:59:30+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230319#p230319</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230319#p230319"/>
<title type="html"><![CDATA[Re: Deklaracja funkcji]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230319#p230319"><![CDATA[
@Kozaczi... Nie masz się czym stresować...Zadawaj choćby &quot;najgłupsze&quot; pytania. Jak nie na tym, to na innym forum, zawsze ktoś Ci pomoże...<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=18769">tfosik</a> — 27 gru 2020, o 18:59</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[kozaczi]]></name></author>
<updated>2020-12-27T16:50:15+01:00</updated>
<published>2020-12-27T16:50:15+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230318#p230318</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230318#p230318"/>
<title type="html"><![CDATA[Re: Deklaracja funkcji]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230318#p230318"><![CDATA[
Uczę się zawsze przez analogie skoro działało to myślałem że jest ok. Dziękuje za uwagi i pozdrawiam.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1255">kozaczi</a> — 27 gru 2020, o 16:50</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[tfosik]]></name></author>
<updated>2020-12-23T12:28:55+01:00</updated>
<published>2020-12-23T12:28:55+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230284#p230284</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230284#p230284"/>
<title type="html"><![CDATA[Re: Deklaracja funkcji]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230284#p230284"><![CDATA[
Witam jest jeszcze kilka innych błędów, np. ==, to nie C (ale to jeszcze chyba przejdzie), zmienna menu (nie wiem czy menu to nie jest zarezerwowana nazwa) no i jeszcze to if(menu==1) then  powinno być bez nawiasów if menu=1 then<br /> Spróbuj może tak:<br />[syntax=vb]Sub Activity_Create(FirstTime As Boolean)<br />        Activity.LoadLayout(&quot;Layout&quot;)<br />     Activity.Title=&quot;KickOff Aplication&quot;<br /><br />           wyglad_zmien ' ################# tu po deklaracji jest ok<br />       <br /> If File.Exists(File.DirInternal,&quot;remote_ip&quot;) Then<br />        remote_odczyt=File.ReadString(File.DirInternal,&quot;remote_ip&quot;)<br />       Else<br />        'remote_ip=&quot;5&quot;<br />                       <br />End If<br /> <br />       <br />edtAddPlayer.Text=remote_odczyt<br />End Sub 'koniec activity create<br /><br /><br />Sub wyglad_zmien<br />       <br /> Dim jezyk As Int ' jezyk aplikacji<br />        jezyk=2<br />        Dim menu As Int ' jezyk aplikacji<br />        menu=1<br /><br /> If jezyk=1 Then<br />                'jezyk polski<br />                btnUstawienia.Text=&quot;Ustawienia&quot;<br />                btnLista.Text=&quot;Lista zawodników&quot;<br />                btnProgram.Text=&quot;Start programu&quot;<br />        End If<br />       <br />        If jezyk=2 Then<br />                'jezyk angielski<br />                btnUstawienia.Text=&quot;Settings&quot;<br />                btnLista.Text=&quot;Player list&quot;<br />                btnProgram.Text=&quot;Start program&quot;<br />               <br />        End If<br /> <br />   If menu=1 Then<br />                btnUstawienia.Visible=True<br />                btnLista.Visible=     True<br />                btnProgram.Visible=   True<br />                btnSave.Visible=     False<br />                edtAddPlayer.Visible=False<br />               <br />End If[/syntax]<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 20 minutach ]</span></strong><br /><br />Jeżeli chcesz tłumaczyć aplikację na różne języki to skorzystaj z tego rozwiązania<br /><!-- m --><a class="postlink" href="https://www.b4x.com/android/forum/threads/b4x-localizator-localize-your-b4x-applications.68751/" >https://www.b4x.com/android/forum/threa ... ons.68751/</a><!-- m --><br />Działa wyśmienicie...<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=18769">tfosik</a> — 23 gru 2020, o 12:28</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2020-12-23T09:34:59+01:00</updated>
<published>2020-12-23T09:34:59+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230279#p230279</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230279#p230279"/>
<title type="html"><![CDATA[Re: Deklaracja funkcji]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230279#p230279"><![CDATA[
przecież masz zmienną język zdefiniowaną w Activity_Create to jak ma ona być widoczna w innej funkcji? Musi być globalna. Ale skoro globalna to po co wtedy przekazywać ją przez argument?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 23 gru 2020, o 09:34</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[kozaczi]]></name></author>
<updated>2020-12-23T09:27:36+01:00</updated>
<published>2020-12-23T09:27:36+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230278#p230278</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230278#p230278"/>
<title type="html"><![CDATA[Deklaracja funkcji]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=23489&amp;p=230278#p230278"><![CDATA[
Witajcie,<br />Dopiero odpaliłem B4A, więc raczkuje. Bądzcie proszę wyrozumiali <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /><br />Gdy wywołuje własną funkcje na zdeklarowanych lokalnie argumentach jest ok. Chodzi o Sub wyglad_zmien(jezyk ,menu) <br />Gdy chce wywołać funkcje z argumentami globalnie zdeklarowanymi wywala błąd?  <br />Czy wlasna funkcje musimy dopisac do spisu na górze, tak jak np sie robi z buttonem w designerze- najpierw  generujemy DIM a pozniej dopiero click. Szukam przyczyny takiego działania , bo wydaje mi się że powinno to działać  na argumentach  zdeklarowanym jednokrotnie-globalnie<br /><br /><br /><br />[syntax=basic4gl]#Region  Project Attributes <br />#ApplicationLabel: B4A Example<br />#VersionCode: 1<br />#VersionName: <br />'SupportedOrientations possible values: unspecified, landscape or portrait.<br />#SupportedOrientations: unspecified<br />#CanInstallToExternalStorage: False<br />#End Region<br /><br />#Region  Activity Attributes <br />#FullScreen: False<br />#IncludeTitle: True<br />#End Region<br /><br />Sub Process_Globals<br />'These global variables will be declared once when the application starts.<br />'These variables can be accessed from all modules.<br />Private xui As XUI<br />    <br /><br /><br /><br />End Sub<br /><br />Sub Globals<br />'These global variables will be redeclared each time the activity is created.<br />Private btnProgram As Button<br />Private btnLista As Button<br />Private lblStanPolaczenia As Label<br />Private btnSave As Button<br />Private edtAddPlayer As EditText<br />Private btnUstawienia As Button<br />    Dim Nr As Int<br />Dim remote_ip As String<br />remote_ip=&quot;to jest to&quot;<br />Dim remote_odczyt As String<br />remote_odczyt=&quot;nie tak&quot;<br /><br /><br /><br /><br />End Sub<br /><br />Sub Activity_Create(FirstTime As Boolean)<br />Activity.LoadLayout(&quot;Layout&quot;)<br />     Activity.Title=&quot;KickOff Aplication&quot;<br /> <br /><br />Dim jezyk As Int ' jezyk aplikacji<br />jezyk=2<br />Dim menu As Int ' jezyk aplikacji<br />menu=1<br /><br /><br />wyglad_zmien(jezyk,menu) ' ################# tu po deklaracji jest ok <br /><br /><br />  If File.Exists(File.DirInternal,&quot;remote_ip&quot;) Then<br />  remote_odczyt=File.ReadString(File.DirInternal,&quot;remote_ip&quot;)<br /><br />Else<br />'remote_ip=&quot;5&quot;<br />  <br />End If<br /><br /><br />edtAddPlayer.Text=remote_odczyt<br />End Sub 'koniec activity create<br /><br />Sub Activity_Resume<br /><br />End Sub<br /><br />Sub Activity_Pause (UserClosed As Boolean)<br /><br />End Sub<br /><br /><br /><br />Sub btnProgram_Click<br /><br />End Sub<br />Sub wyglad_zmien(jezyk ,menu) <br />If (jezyk==1) Then <br />'jezyk polski<br />btnUstawienia.Text=&quot;Ustawienia&quot;<br />btnLista.Text=&quot;Lista zawodników&quot;<br />btnProgram.Text=&quot;Start programu&quot;<br />End If<br /><br />If (jezyk==2) Then<br />'jezyk angielski<br />btnUstawienia.Text=&quot;Settings&quot;<br />btnLista.Text=&quot;Player list&quot;<br />btnProgram.Text=&quot;Start program&quot;<br /><br />End If<br /><br />   If (menu==1) Then<br />btnUstawienia.Visible=True<br />btnLista.Visible=     True<br />btnProgram.Visible=   True<br />btnSave.Visible=     False<br />edtAddPlayer.Visible=False<br /><br />   <br />   <br />End If<br /><br />End Sub<br /><br />Sub btnLista_Click<br /><br />  wyglad_zmien(jezyk,menu)  ' ################# tu  nie  idzie<br /><br /><br />End Sub<br /><br />Sub btnSave_Click<br />File.WriteString(File.DirInternal,&quot;remote_ip&quot;,remote_ip)<br /><br />End Sub<br /><br />Sub edtAddPlayer_EnterPressed<br /><br /><br />End Sub<br /><br /><br /><br />Sub btnUstawienia_Click<br /><br /><br />End Sub[/syntax]<br /><a href="https://obrazkiforum.atnel.pl/1255/8beec6f19c4d592b2b427e3460ecd5c2.png"  class="postlink"><img src="https://obrazkiforum.atnel.pl/thumb/1255/8beec6f19c4d592b2b427e3460ecd5c2.png" alt="Obrazek" /></a><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1255">kozaczi</a> — 23 gru 2020, o 09:27</p><hr />
]]></content>
</entry>
</feed>